import request from "@/utils/request";

// 显示库位类型
export function getLocationType() {
  return request({
    url: "/Warehouse/ShowLocationType",
    method: "get",
  });
}

// 显示仓库
export function getWarehouse() {
  return request({
    url: "/Warehouse/ShowWarehouse",
    method: "get",
  });
}

// 分页查询显示库位
export function getLocation(params: PageQuery) {
  return request({
    url: "/Warehouse/ShowLocation",
    method: "get",
    params,
  });
}

// 添加仓库
export function AddLocation(data: any) {
  return request({
    url: "/Warehouse/AddLocation",
    method: "post",
    data: data,
  });
}

// 删除仓库
export function DelLocation(data: any) {
  return request({
    url: "/Warehouse/DelLocation?id=" + data,
    method: "delete",
  });
}

// 反填仓库
export function BackFillLocation(data: any) {
  return request({
    url: "/Warehouse/BackFillLocation?id=" + data,
    method: "get",
  });
}

// 修改仓库
export function UpdLocation(data: any) {
  return request({
    url: "/Warehouse/UpdLocation",
    method: "put",
    data: data,
  });
}
